imcontext: Fixes to the state machine
authorMatthias Clasen <mclasen@redhat.com>
Wed, 24 Feb 2021 18:31:31 +0000 (13:31 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 24 Feb 2021 18:31:31 +0000 (13:31 -0500)
commit55f871c19375e8a6839eb59d984324f1ff6ebfc4
tree1a1c29e8901beeb31c37a9c1ff0833eb87106819
parentce2835265b26e5b2219e4c65b04cb37ce5a92c81
imcontext: Fixes to the state machine

It turns out that we we were sometimes emitting
preedit-end multiple times, and sometimes not at
all. Same for preedit-start. To fix this up, introduce
a in_compose_sequence flag, maintain it, and use it
in the right places.

After these changes, both

C-S-u 1 2 3 Enter
Compose a e

generate the right signals:

preedit-start, preedit-changed,..., preedit-end, commit
gtk/gtkimcontextsimple.c